<template>
  <view class="userPass">
    <view class="userPass-content">
      <uni-section title="基本信息" type="line">
        <view class="example">
          <uni-forms ref="formRef" :modelValue="formData" :label-width="80">
            <uni-forms-item label="账号" required>
              <uni-easyinput v-model="formData.name" placeholder="请输入姓名" />
            </uni-forms-item>
            <uni-forms-item label="密码" required>
              <uni-easyinput v-model="formData.age" placeholder="请输入年龄" />
            </uni-forms-item>
            <uni-forms-item label="重复密码" required>
              <uni-easyinput v-model="formData.age" placeholder="请输入年龄" />
            </uni-forms-item>
            <button class="form-btn" type="primary" @click="handleSubmit()">提交</button>
          </uni-forms>
        </view>
      </uni-section>
    </view>

  </view>
</template>

<script>

export default {
  data() {
    return {
      imageStyles: {
        width: 64,
        height: 64,
        border: {
          color: '#ff5a5f',
          width: 2,
          style: 'dashed',
          radius: '2px'
        }
      },

      rules: {
        name: {
          rules: [
            {
              required: true,
              errorMessage: '姓名不能为空'
            }
          ]
        },
        age: {
          rules: [
            {
              required: true,
              errorMessage: '年龄不能为空'
            },
            {
              format: 'number',
              errorMessage: '年龄只能输入数字'
            }
          ]
        }
      },
      formData: {}
    };
  },
  onLoad(option) {},
  computed: {},
  methods: {
    handleSubmit() {}
  }
};
</script>

<style lang="scss" scoped>
.userPass {
  .userPass-content {
    padding: 30rpx;
    .form-btn {
      margin-top: 30rpx;
    }
  }
}
</style>